gtk/textview: Improve check for cursor-mode
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 6 Nov 2020 13:30:18 +0000 (14:30 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 6 Nov 2020 13:30:18 +0000 (14:30 +0100)
commit4751ac1ac821740d94a323c559ef28e2aec5c52a
treebc1a95c4c7014505a61a8b651269c5815eee14d9
parent9d56c56117b6dd83fad8a7a49a2266a3ab0ba789
gtk/textview: Improve check for cursor-mode

Check the text handle role, instead of looking for the other handle
visibility. The other handle may be invisible during selection mode
(e.g. pointing to offscreen contents). This fixes both this code
switching to cursor mode out of the blue, and possible crashes later
on as this handle might be hidden in the process, while its own event
controller is handling events on the parent surface.
gtk/gtktextview.c